<?php
defined('PHPFOX') or exit('NO DICE!');

class Hoidap_Component_Controller_Index extends Phpfox_Component
{
	
	public function process()
	{		
		/*
		if  id   => view
		if  secsion => chu de
		if	category => danh muc
		*/	
		
		$sFeedDisplay = 'feed.display';
		(($sPlugin = Phpfox_Plugin::get('feed.component_controller_index_feeddisplay')) ? eval($sPlugin) : false);
		/* Load the picup files if needed*/
		if (Phpfox::isMobile() && ( ($sBrowser = Phpfox::getLib('request')->getBrowser()) && strpos($sBrowser, 'Safari') !== false))
		{
			$sMethod = 'simple';
			$this->template()->setHeader(array(
				'<script type="text/javascript">
						var flash_user_id = '.Phpfox::getUserId() .';
						var sHash = "'.Phpfox::getService('core')->getHashForUpload().'";</script>',
				'mobile.js' => 'module_photo'
				))->assign(array('bRawFileInput' => true));
		}
		if ($this->request()->getInt('req2') > 0)
		{
			return Phpfox::getLib('module')->setController('hoidap.view');
		}	
		$this->template()->setEditor()->setHeader('cache', array(
				'feed.js' => 'module_feed',					
				'comment.css' => 'style_css',					
				'quick_edit.js' => 'static_script',
				'jquery/plugin/jquery.highlightFade.js' => 'static_script',
				'jquery/plugin/jquery.scrollTo.js' => 'static_script'								
			)					
		)
		->assign(array('sFeedDisplay' => $sFeedDisplay));		



		
	}
}

?>
